You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve Code with Lambda in org.apahce.hadoop.hdfs.server.namenode package.
For example:
Current logic:
public ListenableFuture<GetJournaledEditsResponseProto> getJournaledEdits(
long fromTxnId, int maxTransactions) {
return parallelExecutor.submit(
new Callable<GetJournaledEditsResponseProto>() {
@Override
public GetJournaledEditsResponseProto call() throws IOException {
return getProxy().getJournaledEdits(journalId, nameServiceId,
fromTxnId, maxTransactions);
}
});
}
Improved Code with Lambda:
public ListenableFuture<GetJournaledEditsResponseProto> getJournaledEdits(
long fromTxnId, int maxTransactions) {
return parallelExecutor.submit(() -> getProxy().getJournaledEdits(
journalId, nameServiceId, fromTxnId, maxTransactions));
}
goiri
changed the title
HDFS-16695. Improve code with Lambda in org.apahce.hadoop.hdfs.servernamenode package
HDFS-16695. Improve code with Lambda in org.apache.hadoop.hdfs.servernamenode package
Aug 1, 2022
Personally, I think this optimization should still be valuable, I hope that the submitted pr is not at the class level, at least at the moudle level.
I wouldn't go for one per class but maybe subpackage.
I also think this PR is doing a couple of things more other than adding lambdas.
For example, adjusting for iterations.
The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
+1 💚
mvninstall
38m 27s
trunk passed
+1 💚
compile
1m 44s
trunk passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚
compile
1m 36s
trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚
checkstyle
1m 34s
trunk passed
+1 💚
mvnsite
1m 46s
trunk passed
+1 💚
javadoc
1m 23s
trunk passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚
javadoc
1m 52s
trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚
spotbugs
3m 44s
trunk passed
+1 💚
shadedclient
23m 15s
branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚
mvninstall
1m 24s
the patch passed
+1 💚
compile
1m 26s
the patch passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚
javac
1m 26s
the patch passed
+1 💚
compile
1m 21s
the patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
hadoop-hdfs-project/hadoop-hdfs generated 1 new + 0 unchanged - 0 fixed = 1 total (was 0)
+1 💚
shadedclient
22m 45s
patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚
unit
240m 48s
hadoop-hdfs in the patch passed.
+1 💚
asflicense
1m 13s
The patch does not generate ASF License warnings.
351m 53s
Reason
Tests
SpotBugs
module:hadoop-hdfs-project/hadoop-hdfs
Dead store to size in org.apache.hadoop.hdfs.server.namenode.INodeWithAdditionalFields.getFeature(Class) At INodeWithAdditionalFields.java:org.apache.hadoop.hdfs.server.namenode.INodeWithAdditionalFields.getFeature(Class) At INodeWithAdditionalFields.java:[line 347]
Personally, I think this optimization should still be valuable, I hope that the submitted pr is not at the class level, at least at the moudle level.
I wouldn't go for one per class but maybe subpackage. I also think this PR is doing a couple of things more other than adding lambdas. For example, adjusting for iterations.
I understand your suggestion that the lambda should be tuned with other code modifications, not just the lambda code.
The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
+1 💚
mvninstall
41m 19s
trunk passed
+1 💚
compile
1m 41s
trunk passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚
compile
1m 30s
trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚
checkstyle
1m 24s
trunk passed
+1 💚
mvnsite
1m 40s
trunk passed
+1 💚
javadoc
1m 20s
trunk passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚
javadoc
1m 39s
trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚
spotbugs
3m 45s
trunk passed
+1 💚
shadedclient
26m 7s
branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚
mvninstall
1m 23s
the patch passed
+1 💚
compile
1m 29s
the patch passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚
javac
1m 29s
the patch passed
+1 💚
compile
1m 18s
the patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
+1 💚
mvninstall
41m 13s
trunk passed
+1 💚
compile
1m 42s
trunk passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚
compile
1m 31s
trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚
checkstyle
1m 24s
trunk passed
+1 💚
mvnsite
1m 39s
trunk passed
+1 💚
javadoc
1m 19s
trunk passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚
javadoc
1m 44s
trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚
spotbugs
3m 46s
trunk passed
+1 💚
shadedclient
26m 27s
branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚
mvninstall
1m 24s
the patch passed
+1 💚
compile
1m 30s
the patch passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚
javac
1m 30s
the patch passed
+1 💚
compile
1m 19s
the patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚
javac
1m 19s
the patch passed
+1 💚
blanks
0m 0s
The patch has no blanks issues.
+1 💚
checkstyle
1m 6s
hadoop-hdfs-project/hadoop-hdfs: The patch generated 0 new + 777 unchanged - 39 fixed = 777 total (was 816)
+1 💚
mvnsite
1m 26s
the patch passed
+1 💚
javadoc
0m 58s
the patch passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚
javadoc
1m 30s
the patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚
spotbugs
3m 33s
the patch passed
+1 💚
shadedclient
26m 18s
patch has no errors when building and testing our client artifacts.
The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
+1 💚
mvninstall
38m 11s
trunk passed
+1 💚
compile
1m 45s
trunk passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚
compile
1m 35s
trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚
checkstyle
1m 29s
trunk passed
+1 💚
mvnsite
1m 43s
trunk passed
+1 💚
javadoc
1m 25s
trunk passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚
javadoc
1m 47s
trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚
spotbugs
3m 43s
trunk passed
+1 💚
shadedclient
23m 10s
branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚
mvninstall
1m 22s
the patch passed
+1 💚
compile
1m 25s
the patch passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚
javac
1m 25s
the patch passed
+1 💚
compile
1m 19s
the patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚
javac
1m 19s
the patch passed
+1 💚
blanks
0m 0s
The patch has no blanks issues.
+1 💚
checkstyle
1m 6s
hadoop-hdfs-project/hadoop-hdfs: The patch generated 0 new + 777 unchanged - 39 fixed = 777 total (was 816)
+1 💚
mvnsite
1m 23s
the patch passed
+1 💚
javadoc
0m 57s
the patch passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚
javadoc
1m 30s
the patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚
spotbugs
3m 17s
the patch passed
+1 💚
shadedclient
22m 34s
patch has no errors when building and testing our client artifacts.
We're closing this stale PR because it has been open for 100 days with no activity. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable.
If you feel like this was a mistake, or you would like to continue working on it, please feel free to re-open it and ask for a committer to remove the stale tag and review again.
Thanks all for your contribution.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of PR
Improve Code with Lambda in org.apahce.hadoop.hdfs.server.namenode package.
For example:
Current logic:
Improved Code with Lambda: